Closes all open files and writes the contents of all file buffers to the harddisk.
オープンしてあるすべてのファイルをクローズして、ファイルバッファの内容をハードディスクに書き込みます。
Reset
Reset
Sub ExampleReset
Sub ExampleReset
On Error Goto ErrorHandler
On Error Goto ErrorHandler
Dim iNumber As Integer
Dim iNumber As Integer
Dim iCount As Integer
Dim iCount As Integer
Dim sLine As String
Dim sLine As String
Dim aFile As String
Dim aFile As String
aFile = "c:\data.txt"
aFile = "c:\data.txt"
iNumber = Freefile
iNumber = Freefile
Open aFile For Output As #iNumber
Open aFile For Output As #iNumber
Print #iNumber, "This is a new line of text"
Print #iNumber, "This is a new line of text"
Close #iNumber
Close #iNumber
iNumber = Freefile
iNumber = Freefile
Open aFile For Input As iNumber
Open aFile For Input As iNumber
For iCount = 1 to 5
For iCount = 1 to 5
Line Input #iNumber, sLine
Line Input #iNumber, sLine
If sLine <>"" then
If sLine <>"" then
rem
Rem
end if
end if
Next iCount
Next iCount
Close #iNumber
Close #iNumber
Exit Sub
Exit Sub
ErrorHandler:
ErrorHandler:
Reset
Reset
MsgBox "All files will be closed",0,"Error"
MsgBox "All files will be closed",0,"Error"
End Sub
End Sub